package org.springsecuritylearn.repository.jvm.lession1.demo1;


import java.util.List;
import java.util.Vector;

/**
 * 内存溢出测试
 * -Xmx20m -Xms5m -XX:+HeapDumpOutOfMemoryError -XX:HeapDumpPath=/Users/zsyubo/Downloads/temp/a.dump
 */
public class OutOfMemoryTest {

    public static void main(String[] args) {
        Vector vector=new Vector();
        for (int i=0;i<25;i++){
            vector.add(new byte[1*1024*1024]);
        }
    }
}
